package com.tistory.wonsama.util;

import java.util.List;

/**
 * 문자열 생성 유틸
 * @author wonsama
 * @since 2012.01.06
 */
public class WStringMaker {


	/**
	 * MAKE INSERT SENTENCE
	 * @param tableName TABLE NAME 
	 * @param headers HEADER FIELDS
	 * @param values VALUES
	 * @return INSERT SENTENCE
	 * @since 2012.01.06
	 */
	public static String makeInsert( String tableName , List<String> headers , List<String> values)
	{
		StringBuffer sb = new StringBuffer();
		sb.append(" INSERT INTO ");
		sb.append(tableName);
		sb.append(" ("+WString.join(headers, " , ") + " ) " );
		sb.append(" VALUES ");
		sb.append(" ("+WString.join(values, " , " , "'") + " ) " );
		
		return sb.toString();
	}
	
}
